package service.operation;

import java.util.Map;

import business.LoginForm;
import frame.form.ActionForm;

public class LoginServiceImp implements LoginService {

	@Override
	public String getVo(ActionForm form,Map<String,String> actionForward) {
		String url = "";
		if(isUser((LoginForm)form)){
			url = "success";
		}else{
			url = "failed";
		}
		return actionForward.get(url);
	}
	
	private boolean isUser(LoginForm form){
		boolean matcher = false;
		if(form.getLoginName().equals("liucz")){
			if(form.getPassword().equals("123")){
				matcher = true;
			}else{
				matcher = false;
			}
		}else{
			matcher = false;
		}
		return matcher;
	}

}
